﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestMatrix.Model
{
    public class tblTestCaseInCI : INotifyPropertyChanged, INotifyPropertyChanging
    {

        public tblTestCaseInCI()
        {
           
        }

        public tblTestCaseInCI(
            int id
            , string EBIProjectName
            , int ReleasedTestCaseCnt
            , int TestCaseInCI
            , int TestCase_Auto_CI
            , int TestCase_Manual_CI
            , int UTCase_CI
  
            )
        {
            this.ID = id;
            this.EBIProjectName = EBIProjectName;
            this.ReleasedTestCaseCnt = ReleasedTestCaseCnt;
            this.TestCaseInCI = TestCaseInCI;
            this.TestCase_Auto_CI = TestCase_Auto_CI;
            this.TestCase_Manual_CI = TestCase_Manual_CI;
            this.UTCase_CI = UTCase_CI;
        }

        private int _ID;

        public int ID
        {
            get { return _ID; }
            set
            {
                if (_ID != value)
                {
                    NotifyPropertyChanging("ID");
                    _ID = value;
                    NotifyPropertyChanged("ID");
                }
            }

        }

        private string _EBIProjectName;

        public string EBIProjectName
        {
            get { return _EBIProjectName; }
            set
            {
                if (_EBIProjectName != value)
                {
                    NotifyPropertyChanging("EBIProjectName");
                    _EBIProjectName = value;
                    NotifyPropertyChanged("EBIProjectName");
                }
            }
        }


        private int _ReleasedTestCaseCnt;

        public int ReleasedTestCaseCnt
        {
            get { return _ReleasedTestCaseCnt; }
            set
            {
                if (_ReleasedTestCaseCnt != value)
                {
                    NotifyPropertyChanging("ReleasedTestCaseCnt");
                    _ReleasedTestCaseCnt = value;
                    NotifyPropertyChanged("ReleasedTestCaseCnt");
                }
            }

        }

        private int _TestCaseInCI;

        public int TestCaseInCI
        {
            get { return _TestCaseInCI; }
            set
            {
                if (_TestCaseInCI != value)
                {
                    NotifyPropertyChanging("TestCaseInCI");
                    _TestCaseInCI = value;
                    NotifyPropertyChanged("TestCaseInCI");
                }
            }

        }

        private int _TestCase_Auto_CI;

        public int TestCase_Auto_CI
        {
            get { return _TestCase_Auto_CI; }
            set
            {
                if (_TestCase_Auto_CI != value)
                {
                    NotifyPropertyChanging("TestCase_Auto_CI");
                    _TestCase_Auto_CI = value;
                    NotifyPropertyChanged("TestCase_Auto_CI");
                }
            }

        }

        private int _TestCase_Manual_CI;

        public int TestCase_Manual_CI
        {
            get { return _TestCase_Manual_CI; }
            set
            {
                if (_TestCase_Manual_CI != value)
                {
                    NotifyPropertyChanging("TestCase_Manual_CI");
                    _TestCase_Manual_CI = value;
                    NotifyPropertyChanged("TestCase_Manual_CI");
                }
            }

        }

        private int _UTCase_CI;

        public int UTCase_CI
        {
            get { return _UTCase_CI; }
            set
            {
                if (_UTCase_CI != value)
                {
                    NotifyPropertyChanging("UTCase_CI");
                    _UTCase_CI = value;
                    NotifyPropertyChanged("UTCase_CI");
                }
            }

        }
        
        public event PropertyChangedEventHandler PropertyChanged;

        // Used to notify that a property changed
        private void NotifyPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        public event PropertyChangingEventHandler PropertyChanging;

        // Used to notify that a property is about to change
        private void NotifyPropertyChanging(string propertyName)
        {
            if (PropertyChanging != null)
            {
                PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
            }

        }
    }
}
